<?php

/*
 * This file is the jQuery for showing the Send Attachment, Acknowledge Sent Attachment, and Archive button.
 * This jQuery also handles the algorithm on what to show depending on its status,
 * and the user taht is viewing the document.
 * 
 * Created by: Peter Agno Jr.
 * Date created: October 23, 2011
 */
?>

// Start function - Add Attachment Transactions 
            function addAttchTransac(varAddInfoHere, varDocumentId, varPosition, varFromMainDoc) { 
                jQuery.ajax({
                    type : 'POST',
                    url : 'ajaxRequests/addAttchTransac.php',
                    dataType : 'json',
                    async : false,
                    data: {
                        documentId : varDocumentId,
                        scrnPostn : varPosition,
                        fromMainDoc : varFromMainDoc
                    },
                    success : function(data){
                       jQuery(varAddInfoHere).append(data.attchTransInfo);
                    },
                    error : function() {
                        alert("Error in getting the attachment transactions.");
                    }
                });
            } // End function - Add Attachment Transactions
